<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
		<title>学生交作业</title>
		<link href="../bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet">
		<script type="text/javascript" src="../jquery-2.1.1/jquery.min.js"></script>
		<script type="text/javascript" src="../bootstrap-3.3.7/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="css/student.css" />
		<script type="text/javascript" src="js/student.js"></script>
		<script type="text/javascript">
			$.ajaxSetup({  
			    complete: function(xhr,status) {  
			        var sessionStatus = xhr.getResponseHeader('sessionstatus');  
			        if(sessionStatus == 'timeout') {  
			            var top = getTopWinow();  
			            var yes = confirm('由于您长时间没有操作, session已过期, 请重新登录.');  
			            if (yes) {  
			                top.location.href = 'login.html';              
			            }  
			        }  
			    }  
			});  
			  
			/** 
			 * 在页面中任何嵌套层次的窗口中获取顶层窗口 
			 * @return 当前页面的顶层窗口对象 
			 */  
			function getTopWinow(){  
			    var p = window;  
			    while(p != p.parent){  
			        p = p.parent;  
			    }  
			    return p;  
			}
			$(function(){
				getStudent();
				getMaterial();
				getHomeWork();
			})
		</script>
	</head>

	<body>
		<div class="container">
			<div class="row st-2">
				<div class="col-md-12">
				<div class="panel panel-primary">
				<div class="panel-heading text-center">
					<h2><a href="javascript:void(0)" onclick="location.reload()" style="color: white;">欢迎登录学生交作业系统</a></h2>
				</div>
				<div class="panel-body">
					<table id="myTb-1" class="table table-1" >
						<thead>
							<tr>
								<th>姓名</th> <th>学号</th> <th>课堂表现</th> <th>考勤</th>
							</tr>
						</thead>
						
						<tbody id="myTb-1-1">
						
						</tbody>
					</table>
				</div>
				</div>
				</div>
			</div>
			<div class="row">
			<div class="col-md-5">
				<br>
				<div class="panel panel-primary">
					<div class="panel-heading text-center">
						<h2>教师发布上课资料</h2></div>
					<div class="panel-body">
						<table class="table table-1">
							<thead>
								<tr>
									<th hidden ="true">编号</th><th>编号</th><th>上课资料</th>
								</tr>
							</thead>
							<tbody id="myTb-2"></tbody>
						</table>
					</div>
				</div>
			</div>

			<div class="col-md-7">
				<br />
				<div class="panel panel-primary">
					<div class="panel-heading text-center">
						<h2>学生交作业</h2></div>
					<div class="panel-body">
						<form id="ff" method="post" enctype="multipart/form-data" style="padding: 0px 50px 10px;">
							<div class="input-group input-group-lg ">
								<input type="file" name="attach" id="fileupload" class="ip-1">
								<span class="input-group-btn">	<button type="button" class="btn btn-primary" onclick="uploadFile();">提交作业</button></span>
							</div>
						</form>
						<hr/>
						<table id="myTb-3" class="table table-1">
							<thead>
								<tr>
									<th hidden="true">No</th><th>文件名</th><th>大小</th><th>上交时间</th>
								</tr>
							</thead>
							<tbody id="myTb-3-3">
							
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		</div>
		<hr>
        <p class="foot">
			指导老师:周湛樟
			&nbsp;EasyUI框架:黄纯锡
			&nbsp;Bootstrap:何景超
			&nbsp;后端:张坤明
			&nbsp;特别鸣谢:广州市白云工商技师学院
		</p>
	</body>

</html>